import java.util.Scanner;

public class LoginMenu {
    public LoginMenu() {
    }

    public void printLoginMenu() {
        int count = 0;
        Scanner sc = new Scanner(System.in);|
        do {
            System.out.println("\t\t系统登录");
            System.out.println("-----------------");
            System.out.println("请输入用户名");
            String uname = sc.next();
            System.out.println("请输入密码");
            String key = sc.next();
            if (uname.equals("Reum") && key.equals("187275")) {
                 count = 0;
                System.out.println("恭喜您，登录成功，请继续其他操作");
                break;
            }

            ++count;
            System.out.println("登陆失败！请重新输入您的用户名和密码");
            if (count <= 2) {
                System.out.println("密码或用户名输入错误" + count + "还剩下" + (3 - count) + "次尝试机会");
            } else {
                System.out.println("非法用户，即将退出系统");
            }
        } while(count < 3);

    }
}
